package com.muyu.danmo.service.impl;

import com.muyu.danmo.domain.DanmoCountry;
import com.muyu.danmo.mapper.DanmoCountryMapper;
import com.muyu.danmo.service.IDanmoCountryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 国籍Service业务层处理
 * 
 * @author yangle
 * @date 2024-12-23
 */
@Service
public class DanmoCountryServiceImpl implements IDanmoCountryService
{
    @Autowired
    private DanmoCountryMapper danmoCountryMapper;

    /**
     * 查询国籍
     * 
     * @param id 国籍主键
     * @return 国籍
     */
    @Override
    public DanmoCountry selectDanmoCountryById(Long id)
    {
        return danmoCountryMapper.selectDanmoCountryById(id);
    }

    /**
     * 查询国籍列表
     * 
     * @param danmoCountry 国籍
     * @return 国籍
     */
    @Override
    public List<DanmoCountry> selectDanmoCountryList(DanmoCountry danmoCountry)
    {
        return danmoCountryMapper.selectDanmoCountryList(danmoCountry);
    }

    /**
     * 新增国籍
     * 
     * @param danmoCountry 国籍
     * @return 结果
     */
    @Override
    public int insertDanmoCountry(DanmoCountry danmoCountry)
    {
        return danmoCountryMapper.insertDanmoCountry(danmoCountry);
    }

    /**
     * 修改国籍
     * 
     * @param danmoCountry 国籍
     * @return 结果
     */
    @Override
    public int updateDanmoCountry(DanmoCountry danmoCountry)
    {
        return danmoCountryMapper.updateDanmoCountry(danmoCountry);
    }

    /**
     * 批量删除国籍
     * 
     * @param ids 需要删除的国籍主键
     * @return 结果
     */
    @Override
    public int deleteDanmoCountryByIds(Long[] ids)
    {
        return danmoCountryMapper.deleteDanmoCountryByIds(ids);
    }

    /**
     * 删除国籍信息
     * 
     * @param id 国籍主键
     * @return 结果
     */
    @Override
    public int deleteDanmoCountryById(Long id)
    {
        return danmoCountryMapper.deleteDanmoCountryById(id);
    }
}
